package Lambda;

import java.util.ArrayList;

public class Student {
    private String name;
    private int age;
    private String gender;
    private double height;
    private double score;

    public Student() {
    }

    public Student(String name, int age, String gender, double height, double score) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.height = height;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(float height) {
        this.height = height;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                ", height=" + height +
                ", score=" + score +
                '}';
    }
    public static void printStudents(ArrayList<Student> students) {
        System.out.printf("%-10s %-5s %-5s %-7s %-6s\n", "Name", "Age", "Gender", "Height", "Score");
        for (Student s : students) {
            System.out.printf("%-10s %-5d %-5s %-7.1f %-6.1f\n",
                    s.getName(), s.getAge(), s.getGender(), s.getHeight(), s.getScore());
        }
    }

}
